Day 2 pre-class assignment

Goals for today's pre-class assignment

  • Make sure that you can get a Jupyter notebook up and running!
  • Learn about algorithms, computer programs, and their relationship
  • To devise and think about the components of an algorithm for a simple task
  • Learn about Python, IPython, and IPython notebooks and understand why we're using it in class.

Assignment instructions

Pre-class assignments will be composed of a combination of videos, text to read, and small assignments. The goal of these assignments is to prepare you for class the following day. You should watch the videos and read the text, and then do the assigned work. You will be graded on making a good-faith effort, not on correctness!

To make notebook cells that have Python code in them do something, hold down the 'shift' key and then press the 'enter' or 'return' key (you'll have to do this to get movies to run). To edit a cell (to add answers, for example) you double-click, add your text, and then enter it by holding down 'shift' and pressing 'enter'.

This assignment is due by 11:59 p.m. the day before class, and should be uploaded into the "Pre-class assignments" dropbox folder for Day 2. Submission instructions can be found at the end of the notebook.


In [ ]:
# The command below this comment imports the functionality that we need to display 
# YouTube videos in a Jupyter Notebook.  You need to run this cell before you
# run ANY of the YouTube videos.

from IPython.display import YouTubeVideo

Algorithms


In [ ]:
# the command below this comment actually displays a specific YouTube video,  
# with a given width and height.  You can watch the video in full-screen (much higher
# resolution) mode by clicking the little box in the bottom-right corner of the video.

YouTubeVideo("jT0KZ849fak",width=640,height=360)

Further reading on algorithms and computer programs

note: This isn't mandatory, but might be helpful!

Wikipedia page on algorithms

Wikipedia page on computer programs

Assignment: Algorithms and computer programs

Question 1: Come up with an algorithm for a simple task that you do every day (i.e., putting on your shoes). What are the steps of this algorithm?

Put your answer to Question 1 here! (double-click on this text to edit this cell, and hit shift+enter to save the text)

Question 2: Think about the algorithm you devised in the previous question and the video you just watched. Identify the various parts of your algorithm, as defined by the video.

Put your answer to question 2 here!

Python, IPython, and IPython notebooks


In [ ]:
YouTubeVideo("L03BzGmLUUE",width=640,height=360)

Assignment: Python, IPython, and IPython notebooks

Question 3: Given the video you watched, why do you think we're using IPython notebooks in class instead of a command-line version of Python?

Put your answer here!

Assignment: Find an example of a model

Question 4: Look around online and find a model that you think is interesting. This model can be of anything that you think is interesting, and as simple or complicated as you want. Write a paragraph or two describing the model, and identifying the components of the model that we talked about in class. Don't worry too much about this being precise - we're going to talk about it in class.

Assignment wrapup

Question 5: What questions do you have, if any, about any of the topics discussed in this assignment after watching the video and reading the links?

Put your answer here!

Question 6: Do you have any further questions or comments about this material, or anything else that's going on in class?

Congratulations, you're done with your first pre-class assignment!

Now, you just need to submit this assignment by uploading it to the course Desire2Learn web page. Go to the "Pre-class assignments" folder, find the dropbox link for Day 2, and upload it there.

See you in class!


In [ ]: